cs-apolo-sapi-v2 icon

cs-apolo-sapi-v2

(0 reviews)

πŸ“˜ API Documentation - cs-apolo-sapi-v2

This section describes the attributes and usage of the cs-apolo-sapi-v2 service.

πŸ’‚οΈ Base Information

  • API Title: cs-apolo-sapi-v2
  • Version: 1.0.0
  • Base URL: https://cs-apolo-sapi-v2-{env}.us-e1.cloudhub.io/api/Replace the environment segment with:
  • dev (Development)
  • qa (Quality Assurance)

πŸ”‘ Authentication

Required Headers

HeaderTypeDescription
client_idStringUnique identifier for API clients
invokerStringJSON with caller information
  • client_id
    • Length: 32 - 36 characters
    • Example: 123e4567-e89b-12d3-a456-426614174000
  • invoker
    • Example: { "application": "Portal","addressIPUser": "192.168.80.13","loginUser": "User","userName": "User Name" }

> πŸ“Œ These headers are required in all requests.

πŸ”’ Endpoint: Create Independent Worker

POST /create-independent-worker
- Description: Creates a new independent worker in the system.

Complete URL

https://cs-apolo-sapi-v2-dev.us-e1.cloudhub.io/api/create-independent-worker

HTTP Method

POST

Required Headers

client_id: YOUR_CLIENT_ID
invoker: { "application": "Portal","addressIPUser": "192.168.80.13","loginUser": "User","userName": "User Name" }
Content-Type: application/json

Authentication

Client ID enforcement and oauth2

Request Body

{
  "worker": {
    "firstName": "Carlos",
    "lastName": "RamΓ­rez",
    "identificationType": "CC",
    "identificationNumber": "1098765432",
    "birthDate": "1990-03-22",
    "gender": "M",
    "email": "carlos.ramirez@example.com",
    "phone": "3157894561",
    "address": "Carrera 45 # 67-89",
    "cityCode": "11001"
  },
  "contract": {
    "consecutiveContract": "59",
    "entryDate": "2025-02-01",
    "riskLevel": "3",
    "averageDailyWage": "120000",
    "workingDays": "L-V",
    "economicActivity": "6201",
    "epsCode": "EPS002",
    "afpCode": "AFP003"
  }
}

Example Request

curl -X POST "https://cs-apolo-sapi-v2-dev.us-e1.cloudhub.io/api/create-independent-worker" \
-H "client_id: YOUR_CLIENT_ID" \
-H "invoker: { \"application\": \"Portal\",\"addressIPUser\": \"192.168.80.13\",\"loginUser\": \"User\",\"userName\": \"User Name\" }" \
-H "Content-Type: application/json" \
-d '{
  "worker": {
    "firstName": "Carlos",
    "lastName": "RamΓ­rez",
    "identificationType": "CC",
    "identificationNumber": "1098765432",
    "birthDate": "1990-03-22",
    "gender": "M",
    "email": "carlos.ramirez@example.com",
    "phone": "3157894561",
    "address": "Carrera 45 # 67-89",
    "cityCode": "11001"
  },
  "contract": {
    "consecutiveContract": "59",
    "entryDate": "2025-02-01",
    "riskLevel": "3",
    "averageDailyWage": "120000",
    "workingDays": "L-V",
    "economicActivity": "6201",
    "epsCode": "EPS002",
    "afpCode": "AFP003"
  }
}'

Example Response

{
  "status": "SUCCESS",
  "code": "200",
  "message": "Independent worker created successfully",
  "data": {
    "workerConsecutive": "8765432",
    "identificationNumber": "1098765432",
    "identificationType": "CC",
    "contractConsecutive": "59",
    "affiliationDate": "2025-02-01T00:00:00Z"
  }
}

⚠️ Error Codes

CodeDescriptionSuggested Solution
400Bad RequestCheck request syntax and parameters.
401UnauthorizedValidate authentication credentials.
404Not FoundConfirm the endpoint URL.
500Internal Server ErrorRetry or contact technical support.

πŸ“ž Support

For assistance, contact the Integration Services and Applications Coordination team.

Email: epalma@fgs.co


Reviews